//
//  AXMidCollectionViewCell.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/10/11.
//  Copyright © 2018年 tzhg. All rights reserved.
//

#import "AXMidCollectionViewCell.h"
#import "UIView+SDAutoLayout.h"
#import "ZXCategories.h"

@interface AXMidCollectionViewCell ()

@end

@implementation AXMidCollectionViewCell

- (id)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self creatView];
        [self setlayout];
    }
    return self;
}

- (void)creatView {
    
    /** imageview */
    self.img = [[UIImageView alloc]init];
    [self.contentView addSubview:self.img];
    /** title */
    self.titleLabel = [[UILabel alloc]init];
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.font = FONT_FOURTEEN;;
    [self.contentView addSubview:self.titleLabel];
    
    
}

- (void)setlayout {
    
    self.img.sd_layout
    .centerXEqualToView(self.contentView)
    .topSpaceToView(self.contentView,0)
    .widthIs(30)
    .heightIs(27);
    
    /** tiitlelabel */
    self.titleLabel.sd_layout
    .rightSpaceToView(self.contentView, 0)
    .topSpaceToView(self.img,10)
    .leftSpaceToView(self.contentView, 0)
    .heightIs(30);
}

@end

